import request from '@/utils/request.js';

// 商品分类列表（级联选择器）
export const getCateListApi = () => {
  return request({
    method: 'GET',
    url: 'categories'
  });
};

// 获取参数列表
export const getParamsApi = (id, params) => {
  return request({
    method: 'GET',
    url: `categories/${id}/attributes`,
    params
  });
};

// 添加商品
export const addGoodsApi = (data) => {
  return request({
    method: 'POST',
    url: 'goods',
    data
  });
};

// 获取数据统计
export const getReportApi = () => {
  return request({
    method: 'GET',
    url: 'reports/type/1'
  });
};

